package cn.hzc.fortess.core.common.constant;


import com.google.common.collect.Lists;

import java.util.List;


public interface Const {

    String DEFAULT_SYSTEM_NAME = "OMS业务支撑运营管理系统";

    String DEFAULT_WELCOME_TIP = "欢迎使用"+DEFAULT_SYSTEM_NAME+"!";

    String ADMIN_ROLE_NAME = "超级管理员";

    String PROJECT_ADMIN_ROLE_NAME = "SAM项目管理员";


    String ADMIN_LOGIN_NAME = "admin";

    int ADMIN_USER_ID = 1;

    int ADMIN_ROLE_ID = 1;  //

    int PROJECT_ADMIN_ROLE_ID = 2;  //

    Integer SAM_PROJECT_ID = 1;

    String SAM_RPOJECT_NAME = "SAM权限管理系统";


    Integer SAM_LESSEE_ID = 1;

    int YES = 1;

    int NO = 0;


    String SESSION_WEAK_PWD_TIPS_KEY = "weakpwdtips";

    int TREE_ROOT_PARENT_ID = 0;

    String TREE_ROOT_PARENT_IDS = "[0],";


    int DEFAULT_IDX = 1;

    String LOG_SPLIT = ";;;";

    String KAPTCHA_SESSION_KEY = "code";

    Integer LEVEL_MENU = 4;

    Integer LEVEL_DEPT = 4;

    //演示专用
    String DEMO_PATH = "/fortressdemo/**";


    /**
     * 不需要权限验证的资源表达式
     */
    List<String> NONE_PERMISSION_RES =
            Lists.newArrayList(new String[]{
                    "/assets/**",
                    "/static/**",
                    "/authspi/**",
                    "/login",
                    "/global/sessionError",
                    "/kaptcha",
                    "/kaptcha/token",
                    "/error",
                    "/global/error",
                    DEMO_PATH});


    static boolean isTreeRoot(Integer id) {
        return id == null || id == TREE_ROOT_PARENT_ID;

    }

}
